/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Railroad.GUI;

import Railroad.Zoznam;
import java.util.ArrayList;
import javax.swing.JLabel;

/**
 *
 * @author Steeween
 */
public class Semafor extends javax.swing.JFrame {

    /**
     * Creates new form Semafor
     */
    private RiadenieNavestidiel riadenieNavestidiel;
    private ArrayList<JLabel> list= new ArrayList<>();
    public Semafor(ArrayList<JLabel> listNavestidiel) {
        for (int i = 0; i < listNavestidiel.size(); i++) {
            listNavestidiel.get(i).setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
           this.getContentPane().add(listNavestidiel.get(i));
            
        }
        initComponents();//
        /*
        list.add(navestidloL);
        list.add(navestidloL1);
        list.add(navestidloL3);
        list.add(navestidloS);
        list.add(navestidloS1);
        list.add(navestidloS3);
        navestidloL.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png"))); 
        navestidloL1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
        navestidloL3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
        navestidloS.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
        navestidloS1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
        navestidloS3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Cervena1.png")));
        */
        
    }
   
    public ArrayList<JLabel> getList()
    {
        return list;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        navestidloL1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        navestidloL3 = new javax.swing.JLabel();
        navestidloL = new javax.swing.JLabel();
        navestidloS1 = new javax.swing.JLabel();
        navestidloS = new javax.swing.JLabel();
        navestidloS3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(0, 0, 0));

        navestidloL1.setForeground(new java.awt.Color(255, 0, 51));
        navestidloL1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/zltablikajuca.gif"))); // NOI18N

        jLabel2.setText("L");

        navestidloL3.setForeground(new java.awt.Color(255, 0, 51));
        navestidloL3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/zltablikajuca.gif"))); // NOI18N

        navestidloL.setForeground(new java.awt.Color(255, 0, 51));
        navestidloL.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/ZltaZelena1.png"))); // NOI18N

        navestidloS1.setForeground(new java.awt.Color(255, 0, 51));
        navestidloS1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/zltablikajuca.gif"))); // NOI18N

        navestidloS.setForeground(new java.awt.Color(255, 0, 51));
        navestidloS.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/zltablikajuca.gif"))); // NOI18N

        navestidloS3.setForeground(new java.awt.Color(255, 0, 51));
        navestidloS3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/zltablikajuca.gif"))); // NOI18N

        jLabel1.setText("L1");

        jLabel3.setText("L3");

        jLabel4.setText("S");

        jLabel5.setText("S1");

        jLabel6.setText("S3");

        jButton1.setText("jButton1");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(navestidloL)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(navestidloL1))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(88, 88, 88)
                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(55, 55, 55)
                                .addComponent(jLabel3)
                                .addGap(93, 93, 93)
                                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(87, 87, 87)
                                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(navestidloL3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(navestidloS)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(navestidloS1)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(navestidloS3))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(40, 40, 40)
                                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(161, 161, 161)
                        .addComponent(jButton1)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(navestidloS3, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(navestidloL3, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)
                            .addComponent(navestidloS1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(navestidloL, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(navestidloL1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(navestidloS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addGap(20, 20, 20)
                .addComponent(jButton1)
                .addGap(0, 129, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        //riadenieNavestidiel.nastavZltuZltu(1);
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Semafor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Semafor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Semafor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Semafor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        

           
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel navestidloL;
    private javax.swing.JLabel navestidloL1;
    private javax.swing.JLabel navestidloL3;
    private javax.swing.JLabel navestidloS;
    private javax.swing.JLabel navestidloS1;
    private javax.swing.JLabel navestidloS3;
    // End of variables declaration//GEN-END:variables
}
